//
//  PlayAudioView.m
//  Yihubang
//
//  Created by xmy on 2016/11/30.
//  Copyright © 2016年 xmy. All rights reserved.
//

#import "PlayAudioView.h"


@interface PlayAudioView ()
@end
@implementation PlayAudioView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
-(void)awakeFromNib{
    [super awakeFromNib];
    [self.comeBackAction addTarget:self action:@selector(removeSelf) forControlEvents:UIControlEventTouchUpInside];
    self.PhoneTime.timerType = MZTimerLabelTypeStopWatch;
    self.PhoneTime.timeLabel.backgroundColor = [UIColor clearColor];
    self.PhoneTime.timeLabel.font = [UIFont systemFontOfSize:16.0f];
    self.PhoneTime.timeLabel.textColor = [UIColor whiteColor];
    self.PhoneTime.timeFormat = @"mm:ss";
    self.PhoneTime.timeLabel.textAlignment = NSTextAlignmentCenter;
}

-(void)removeSelf{
    [UIView animateWithDuration:1.0 animations:^(void){
        self.alpha = 0.f;
    } completion:^(BOOL finish){
        [self.PhoneTime reset];
        [self.PhoneTime pause];
        [self.delegate removePlayAudioView];
        [self removeFromSuperview];
    }];
}

@end
